package com.test.designPattern.ch16;

/**
 * @ClassName TerminalExpression
 * @Description TODO
 * @Author 维康
 * @Date 2018/6/11 15:50
 * @Version 1.0
 **/
public class TerminalExpression implements Expression {
    private String data;

    public TerminalExpression(String data){
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if(context.contains(data)){
            return true;
        }
        return false;
    }
}
